import React, { Component,lazy,Suspense } from 'react';
import { Switch,Route,Redirect } from 'react-router-dom'
import Tabbar from "../../components/Tabbar/tabbar"
import RouterView from '../../router/RouterView';

interface Props{
    routes:any[]
}

class index extends Component <Props>{
    render() {
        return (
            <div className='index'>
                {/* 渲染RouterView组件(传入二级路由规则,内部会动态生成二级路由规则) */}
                <RouterView routes={this.props.routes} />
                 {/* Tabbar组件 */}
                    <Tabbar /> 
            </div>
        );
    }
}

export default index;